/********************************************************/
/*	Copyright (C) 2016 Gong Li Bin			*/
/*	Project:	GlbCloud			*/
/*	Author:		gong_libin			*/
/*	Date:		2012_01_20			*/
/*	File:		MrPipe.h			*/
/********************************************************/

#ifndef	_MRPIPE_H
#define	_MRPIPE_H

#include "MrGlobal.h"

#define	MR_PIPE				102400

class CMrPipe
{
public:
	CMrPipe();
	virtual ~CMrPipe();

	void MrPipeClose();
	void MrPipeResultFree();
	char* MrPipeResultGet();
	ULONG MrPipeRead(ULONG ulSize);
	void MrPipeResultReset(ULONG ulSize);
	int MrPipeResultMalloc(ULONG ulSize);
	int MrPipeOpen(char* pszCmd, char* pszType);

protected:
	char* m_pszResult;

private:
	FILE* m_pstPipe;

};

#endif /* _MRPIPE_H */
